-
Notifications
You must be signed in to change notification settings - Fork 8k
drivers: ethernet: adin1100: add support for hardware reset #97064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add
select GPIO if .....
to config PHY_ADIN2111
like on the other phys.
drivers/ethernet/phy/phy_adin2111.c
Outdated
if (ret < 0) { | ||
return ret; | ||
} | ||
k_busy_wait(50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a definite
drivers/ethernet/phy/phy_adin2111.c
Outdated
#if ADIN2111_RST_GPIO_SUPPORT | ||
const struct phy_adin2111_config *config = dev->config; | ||
|
||
if (!config->reset_gpio.port) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invert if and put the new logic inside, so the goto isn't needed anymore
drivers/ethernet/phy/phy_adin2111.c
Outdated
#if ADIN2111_RST_GPIO_SUPPORT | ||
const struct gpio_dt_spec reset_gpio; | ||
#endif /* ADIN2111_RST_GPIO_SUPPORT */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put this after the mdio bus and not between bools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only the ADIN1100 part should support the reset pin, as the reset pin on the adin2111, which is a mac and phy combined, would reset both. also the parent mac (adi,adin1110) also has a reset-gpios prop
Add support for hardware reset via GPIO in the ADIN1100 PHY driver. The reset pin is configured via device tree using the reset-gpios property. Signed-off-by: Tim Pambor <[email protected]>
|
Add support for hardware reset via GPIO in the ADIN2111 PHY driver.
The reset pin is configured via device tree using the reset-gpios property.